function choice = humanAgent(round,playerIndx,results,roster,rankings)
fprintf('\n');
RB = 1;
QB = 2;
WR = 3;
TE = 4;
K = 5;
DST = 6;
% RWR = 7;
% B = 8;

avIndx = find(rankings.available > 0);
rbIndx = intersect(find(rankings.pos == RB),avIndx);
wrIndx = intersect(find(rankings.pos == WR),avIndx);
qbIndx = intersect(find(rankings.pos == QB),avIndx);
teIndx = intersect(find(rankings.pos == TE),avIndx);
dstIndx = intersect(find(rankings.pos == DST),avIndx);
kIndx = intersect(find(rankings.pos == K),avIndx);
rwrIndx = union(rbIndx,wrIndx);


items(1).name = 'RB :';
values = cell(1, 1 + length(rbIndx));
values{1} = '<select RB>';
for i=1:length(rbIndx)
    name = rankings.name(rbIndx(i));
    msg = sprintf('%s - %d', name{1}, rankings.bye(rbIndx(i)));
    values{i+1} = msg;
end
items(1).values = values;

items(2).name = 'QB :';
values = cell(1, 1 + length(qbIndx));
values{1} = '<select QB>';
for i=1:length(qbIndx)
    name = rankings.name(qbIndx(i));
    values{i+1} = sprintf('%s - %d',name{1}, rankings.bye(qbIndx(i)));
end
items(2).values = values;

items(3).name = 'WR :';
values = cell(1, 1 + length(wrIndx));
values{1} = '<select WR>';
for i=1:length(wrIndx)
    name = rankings.name(wrIndx(i));
    values{i+1} = sprintf('%s - %d',name{1}, rankings.bye(wrIndx(i)));
end
items(3).values = values;

items(4).name = 'RWR:';
values = cell(1, 1 + length(rwrIndx));
values{1} = '<select RWR>';
for i=1:length(rwrIndx)
    name = rankings.name(rwrIndx(i));
    values{i+1} = sprintf('%s - %d',name{1}, rankings.bye(rwrIndx(i)));
end
items(4).values = values;

items(5).name = 'TE :';
values = cell(1, 1 + length(teIndx));
values{1} = '<select TE>';
for i=1:length(teIndx)
    name = rankings.name(teIndx(i));
    values{i+1} = sprintf('%s - %d',name{1}, rankings.bye(teIndx(i)));
end
items(5).values = values;

items(6).name = 'K  :';
values = cell(1, 1 + length(kIndx));
values{1} = '<select K>';
for i=1:length(kIndx)
    name = rankings.name(kIndx(i));
    values{i+1} = sprintf('%s - %d',name{1}, rankings.bye(kIndx(i)));
end
items(6).values = values;

items(7).name = 'DST:';
values = cell(1, 1 + length(dstIndx));
values{1} = '<select DST>';
for i=1:length(dstIndx)
    name = rankings.name(dstIndx(i));
    values{i+1} = sprintf('%s - %d',name{1}, rankings.bye(dstIndx(i)));
end
items(7).values = values;

title = 'Player Dialog';
msg = 'Choose your player';
while 1
    out = CSEFlagDialog(items, title, msg);
    answer = [out.answer];
    if length(find((answer - 1) > 0)) ~= 1
       fprintf('Choose only one player (dummy)\n'); 
    else
       indx = find(answer > 1);
       val = answer(indx) - 1;
       if indx == 1
           choice = rbIndx(val);
       elseif indx == 2
           choice = qbIndx(val);
       elseif indx == 3
           choice = wrIndx(val);
       elseif indx == 4
           choice = rwrIndx(val);
        elseif indx == 5
           choice = teIndx(val);
        elseif indx == 6
           choice = kIndx(val);
        elseif indx == 7
           choice = dstIndx(val);
       end
       return;
    end
end
